<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml">

<head>

<meta content="text/html; charset=utf-8" http-equiv="Content-Type">


<title>[{$cfg_site_name}]</title>

<script>
	function addToCartRM(){
			var category_item = '<?php echo $cwval['cwei_category'] ?>';
			var area_item = '<?php echo $cwval['cwei_area'] ?>';
			var cwname = '<?php echo $cwval['cwei_name'] ?>';
			var cwprice = '<?php echo $cwval['cwei_rm_goodsprice'] ?>';
			var cwrmprice = '<?php echo $cwval['cwei_rm_sellprice'] ?>';
			var cwcurrrate = '<?php echo $currency_rate ?>';
			var cwqty = '<?php echo $cwval['cwei_kg'] ?>';
			var cwid = '<?php echo $cwval['cwei_gid'] ?>';
	
			var productName=cwname;
			
			var productUrl="cangwei.php?cat=" + category_item + "&area=" + area_item;
			var Picture="images/cangwei.png";
			var ShopName="-";
			var ShopHref="-";
			var price=cwprice;
			var productNum="1";
			var productSendPrice="0";
			var productsize=cwqty;
			var isAuction="0";
			var chicun="0";
			var yanse="-";
			var type="1";
			var expressno="";
			var VIPPrice1="-1",VIPPrice2="-1",VIPPrice3="-1";
			var productRemark="{lang m_space}: " + cwname;
			var category = category_item;
			var area = area_item;
			var cw_id = cwid;
			
			var cw_rm_price=cwrmprice;
			var cw_curr_rate=cwcurrrate;
			
			$.ajax({
                    type: "POST",
                    url: "/ajax/fast_ajax.php?action=addcangwei",
                    dataType: "json",
                    //contentType: "application/json;utf-8",
        
					data:"adddata="+encodeURIComponent("{\"name\":'" + productName + "',\"href\":'" + productUrl + "',\"picture\":'" + Picture + "',\"thumbnail\":'" + Picture + "',\"chicun\":'" + chicun + "',\"yanse\":'" + yanse + "',\"shopName\":'" + ShopName + "',\"shopHref\":'" + ShopHref + "',\"price\":'" + price + "',\"vipPrice1\":'" + VIPPrice1 + "',\"vipPrice2\":'" + VIPPrice2 + "',\"vipPrice3\":'" + VIPPrice3 + "',\"buyNum\":'" + productNum + "',\"freight\":'" + productSendPrice + "',\"isAuction\":'" + isAuction + "',\"remark\":'" + productRemark  + "',\"type\":'" + type  + "',\"expressno\":'" + expressno + "',\"buytype\":'" + category + "',\"buyarea\":'" + area + "',\"size\":'" + productsize + "',\"cw_id\":'" + cw_id + "',\"cw_rm_price\":'" + cw_rm_price + "',\"cw_curr_rate\":'" + cw_curr_rate + "'}"),

                   timeout: 10000,
				   error: function (){ alert("{lang m_space_eq}") },
				   success: function (data){
					location.href="/shoppingcart.php";
				   }
                });
		
		}
</script>

</head>

<body>

{template 'header'}

<link type="text/css" rel="stylesheet" href="{TPL}css/bootstrap.min.css">

<div class="container">

  <div id="content">

    <div class="container-fluid">

      <div class="span11">

        <h2><?php echo $cwval['cwei_name'] ?></h2>

      </div>

      <div class="row-fluid" style="padding:50px 0 20px 0;">

        <!--    *******************************      Image Block      *******************************     -->

        <div class="span4"> <img   id="pic" class="roundBorder" src="{TPL}newedit/images/li3.png" alt="" /> <BR>

          <BR>

        </div>

        <!--    *******************************      Price Block      *******************************     -->

        <div class="span8"> 

		<span class='pricetag' style='float:left;'><span style='font-size:25px;'><sup>RM</sup></span>
		<strike style='font-size:18px; color:#ddd;'><span id='grandtotal'><?php echo $cwval['cwei_rm_goodsprice'] ?></span></strike>
		<span id='discount'><?php echo $cwval['cwei_rm_sellprice'] ?></span></span>
		
		
		<BR>

          <BR>

          <table class="itemlist" style="width:100%">
			<TR >

              <TD style="font-size:25px !important"> RMB </TD>

              <TD style="width:75%;font-size:25px !important"><b style="font-size:15px !important">: </b>
		
              <?php echo $totalrmb = round((float)$cwval['cwei_rm_sellprice']*(float)$currency_rate,2) ?> </TD>

            </TR>
            <TR>

              <TD> {lang m_area} </TD>

              <TD style="width:75%;">: 

              <?php echo $cwval['cwei_area'] ?> </TD>

            </TR>

            <TR>

              <TD>{lang m_choose_ship_ty}</TD>

              <TD>: <?php echo $cwval['cwei_category'] ?></TD>

            </TR>

            <TR>

              <TD>{lang m_current_stock}</TD>

              <TD>: <span id='stock'><?php echo $cwval['cwei_qty'] ?></span></TD>

            </TR>

            <TR>

              <TD>{lang m_detail}</TD>

              <TD>: <?php echo $cwval['cwei_remark'] ?></TD>

            </TR>

          </table>


        </div>

      </div>

      <div class="row-fluid" >
		<h3>Terms & Conditions</h3>
		<div id="divterms" style="height:150px; border: 2px solid #a1a1a1; padding: 10px 40px;  width: 90%;overflow: auto">
			<?php echo $term_condition ?>
		</div>

      </div>
	  <br />
	  <div align="right">
		<form>
			<button type="button" class="btn-primary" onclick="addToCartRM()" style="width: 150px;height: 60px;font-size:18px">{lang m_agree_addtocart}</button>
		</form>
	  </div>
<br />
    </div>

  </div>

  <!-- content -->

</div>

{template 'footer'}

</body>

</html>

